﻿using BCCommon;
using BCCommon.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace BCDto.MakeStaticPagingComponent.PageTemplate
{
    /// <summary>
    /// 页面模板请求模型
    /// </summary>
    public class PageTemplateRequestDto
    {
        /// <summary>
        /// 网站模板Id
        /// </summary>
        [Display(Name = "网站模板Id")]
        [Required(ErrorMessage = "{0} 不能为空。")]
        public int WebsiteTemplateId { get; set; }
        /// <summary>
        /// 页面名称
        /// </summary>
        [Display(Name = "页面名称")]
        [Required(ErrorMessage ="{0} 不能为空。")]
        [StringLength(50, MinimumLength = 1, ErrorMessage = "{0} 长度应为 {2} 到 {1} 个字符。")]
        public string PageName { get; set; }
        /// <summary>
        /// 页面编码
        /// </summary>
        [Display(Name = "页面标记码")]
        [Required(ErrorMessage = "{0} 不能为空。")]
        [StringLength(50, MinimumLength = 1, ErrorMessage = "{0} 长度应为 {2} 到 {1} 个字符。")]
        [RegularExpression(RegexPatterns.ENGLISH_AND_NUMBER, ErrorMessage = "{0} 应只包含母字母数字和下划线。")]
        public string PageCode { get; set; }
        /// <summary>
        /// 页面地址名称
        /// </summary>
        [Display(Name = "Url显示名称")]
        [Required(ErrorMessage = "{0} 不能为空。")]
        [StringLength(50, MinimumLength = 1, ErrorMessage = "{0} 长度应为 {2} 到 {1} 个字符。")]
        [RegularExpression(RegexPatterns.ENGLISH_LOWER_AND_NUMBER, ErrorMessage = "{0} 应只包含小写字母字母数字和下划线。")]
        public string PageUrlName { get; set; }
        /// <summary>
        /// 页面Html路径
        /// </summary>
        [Display(Name = "页面Html路径")]
        public string PageHtmlPath { get; set; }
        /// <summary>
        /// 页面Html
        /// </summary>
        [Display(Name = "页面Html")]
        public string PageHtml { get; set; }
        /// <summary>
        /// 页面数据定义文本
        /// </summary>
        [Display(Name = "页面数据定义文本")]
        public string PageDefine { get; set; }
        /// <summary>
        /// 页面关键字（SEO使用）
        /// </summary>
        [Display(Name = "页面关键字")]
        [MaxLength(1000,ErrorMessage ="{0} 最多支持{1}个字符")]
        public string PageKeyword { get; set; }
        /// <summary>
        /// 页面描述（SEO使用）
        /// </summary>
        [Display(Name = "页面描述")]
        [MaxLength(2000,ErrorMessage = "{0} 最多支持{1}个字符")]
        public string PageDescription { get; set; }
        /// <summary>
        /// 父级页面编码
        /// </summary>
        [Display(Name = "父级页面标记码")]
        public string ParentPageCode { get; set; }
        /// <summary>
        /// 页面同级别显示顺序
        /// </summary>
        [Display(Name = "页面同级别显示顺序")]
        public int PageIndex { get; set; }

        /// <summary>
        /// 是否为内容页
        /// </summary>
        [Display(Name = "是否为内容页")]
        [Required(ErrorMessage = "{0} 不能为空。")]
        public bool IsContentPage { get; set; }
        /// <summary>
        /// 是否为分页列表页
        /// </summary>
        [Display(Name = "是否为分页列表页")]
        [Required(ErrorMessage = "{0} 不能为空。")]
        public bool IsPagingListPage { get; set; }
        /// <summary>
        /// 内容页页面编码
        /// </summary>
        [Display(Name = "内容页页面编码")]
        public string ContentPageCode { get; set; }
        /// <summary>
        /// 已使用
        /// </summary>
        [Display(Name = "已使用")]
        public bool IsUsed { get; set; }
        /// <summary>
        /// 分页列表页服务标签
        /// </summary>
        [Display(Name = "分页列表页服务标签")]
        public string PagingListServiceTag { get; set; }
        /// <summary>
        /// 分页列表页服务标签参数
        /// </summary>
        [Display(Name = "分页列表页服务标签参数")]
        public string PagingListServiceParams { get; set; }
        /// <summary>
        /// 分页每页数量
        /// </summary>
        [Display(Name = "分页每页数量")]
        public int? ListSize { get; set; }

        /// <summary>
        /// 系统服务列表Id
        /// </summary>
        [Display(Name = "系统服务列表Id")]
        public int? SystemServiceListingId { get; set; }
    }
}
